package ui.activity.profit.biz;

import base.BaseBiz;
import base.BaseResp;
import coom.BaseSubscribe;
import coom.RetrofitHelp;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import ui.model.RankingBean;

/**
 * Created by chenjian on 19/2/26.
 * 1
 */

public class RankingBiz extends BaseBiz {

    /**
     * 获取当日收益
     */
    public void GetInComeDetail(String type, String strDate, final Callback<RankingBean> callback) {
        com.add(RetrofitHelp.getSecretApi().top_income(type, strDate)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new BaseSubscribe<BaseResp<RankingBean>>() {

                    @Override
                    public void onSuccess(Object obj) {
                        callback.onSuccess((RankingBean) obj);
                    }

                    @Override
                    public void onFailure(Object obj) {
                        callback.onFailure((RankingBean) obj);
                    }
                })
        );
    }


}
